#include <stdio.h>
#include <stdlib.h>

/*  n4.cpp
*   This program is part of the °Simple-Benchs° Benchmark
*   The complexity of this program is O(n**4) where n is the number of pairs.
*
*   
*   To run the program: ./program value
*/

/*  Initial check to verify whether the amount of arguments is correct or not.  Complexity O(1) */
short Initial_check(int inputs){
  if (inputs < 2) {
    printf("Wrong number of argments. Syntax: ./program number\n");
    return 1;
  }
  return 0;
}


int main(int argc, char **argv){

	  /* Checking arguments */
	 if (Initial_check(argc)) return 1;

	 int sum=0;

	int value = atoi(argv[1]);
	for (int count1 = 0; count1 < value; count1++)
		for (int count2 = 0; count2 < value; count2++)
			for (int count3 = 0; count3 < value; count3++)
				for (int count4 = 0; count4 < value; count4++)
					sum += 1;

	for (int count1 = 0; count1 < value; count1++)
		for (int count2 = 0; count2 < value; count2++)
			sum -= 1;
	return 0;
}